package demo05;

public class Biology {
    //父类公开属性
    public double height;
    //父类私有属性
    private double weight;

    //父类公开构造方法
    public Biology() {
    }

    //父类私有构造方法
    private Biology(double height, double weight) {
        this.height = height;
        this.weight = weight;
    }

    //父类公开构造方法
    public Biology(double height) {
        this.height = height;
    }

    //父类公开普通方法
    public void speak(){
        System.out.println("生物可以交流");
    }

    //父类私有普通方法
    private String eatFood(String food){
        System.out.println("生物需要吃东西");
        return food;
    }

}
